﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp22
{
    class Program
    {
        static void Main(string[] args)
        {
            
            DirectoryInfo directoryInfo = new DirectoryInfo("D:\\mySolo");

            directoryInfo.Delete(true);

            directoryInfo.Create();

            FileInfo fileInfo = new FileInfo("D:\\mySolo\\test.txt");

            fileInfo.Create().Close();

            string path = @"D:\\mySolo\\test.txt";

            StreamWriter streamWriter = new StreamWriter(path);

            
            streamWriter.WriteLine("这世间所有的相遇都是久别重逢");

            
            streamWriter.Flush();

            streamWriter.Close();

            Console.WriteLine("操作成功");

        }
    }
}
